home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
help
/
DOC
< prev
next >
Wrap
Text File
|
1995-07-29
|
5KB
|
117 lines
The low-level scohelp api enables Motif applications to act as
scohelp "clients", allowing requests to be made of scohelp to
display specific topics. Topics can be either
"hard coded" using the actual topic name, or can be a "widget tree" name.
"Widget tree" names are intended to be used by a higher level api
for internal SCO use only; the direct user of the low-level api will
always use "hard coded" topic names.
The Imakefile file how the library and include file should be compiled.
Callable Scohelp api - client side - descriptions of using the routines:
#include "api.h"
1) HelpStatus HelpOpen(client_context, toplevel, bookdir,
wait_cursor, error_handler)
XtPointer *client_context;
Widget toplevel;
char *bookdir;
void ((*wait_cursor)(Boolean));
void ((*error_handler)(char *));
HelpOpen() performs all of the initialization required for the scohelp
client.
The address of client_context (a global pointer) is passed to HelpOpen()
to allow HelpOpen() to return a pointer that represents all the information
that scohelp needs about that client. The pointer that is returned by
HelpOpen() in the client_context parameter is then subsequently used in
all the HelpDisplay() calls and the HelpClose() call that the client makes.
Toplevel refers to the toplevel widget of the application - used only to
get display information. NOTE: In previous versions of the api this
actually needed to be an always present, realized widget (because it
was used for communication). This is no longer a requirement.
Bookdir is the name of the documentation book (not a full pathname, but it
is the name of the directory in which the topics in the book reside),
and provides a default book name for the client. This default book name
may be overridden in subsequent calls to HelpDisplay() (see below), but
if all of the information to be displayed is from this book, then the
application developer may provide the filename to HelpOpen() and
not have to pass it into HelpDisplay().
The wait_cursor required argument points to a routine within the client
application which is used for turning the wait cursor on and off. The
wait_cursor routine will be called and passed a TRUE value when the wait
cursor is to be turned on during HelpDisplay() and HelpClose() (below), and a
FALSE value when it is to be turned off.
The error_handler argument points to a routine responsible for displaying
error messages in the client. This routine will be called by the api with
a single argument - the string that is to be displayed in the client's
error dialog. For example, if the exec of scohelp fails, the api notifies
the user that help is unavailable by invoking the client's error handler
with the appropriate string argument.
2) HelpStatus HelpDisplay( client_context, bookdir, obj_type, entry)
XtPointer client_context;
char *bookdir;
HelpObject obj_type;
char *entry;
HelpDisplay() is used to make a topic display request of scohelp.
Client_context is the same global pointer used in HelpOpen() but this time
the pointer returned by HelpOpen is passed, not the address of the pointer.
After having called HelpOpen(), this pointer now represents the initialized
scohelp client information.
Bookdir is optional here, depending on whether or not one was passed into
HelpOpen(). If a valid filename (anything but NULL) is passed here, the book
specified by that name will be opened for display. Otherwise, the default
book passed into HelpOpen() will be used instead. Note: if neither bookname
is valid, the api will indicate an error has occured.
Obj_type is of the type HelpObject and must be one of either helpTopic
helpWidget. Use of either of these objects results in scohelp displaying
a topic. HelpWidget is for use with specifying a widget tree hierarchy
and helpTopic specifies that an actual "hard-coded" topic name is passed
in the "entry" parameter. Entry is passed in the usual null-terminated
character string format. The helpWidget object type is intended for use
with a higher level api; client programs using this api directly
should use the helpTopic object type with the entry parameter.
3) HelpStatus HelpClose(client_context)
XtPointer client_context;
HelpClose() is called only when the client application wants scohelp to
close all of its associated documents.
Client_context is the same pointer returned in HelpOpen() and represents the
necessary scohelp client information for scohelp to close the current client
scohelp session.
HelpDefaults.ad
===============
This file defines messages used by the low-level help api. It should be
included in the resource file for each client application that uses
the help api. It can be copied in, or included in the resource file.
Sample Documentation
====================
There are several html source files that provide a small amount of text
that should indicate what context they were called from. These files
should be installed into a directory called api_book under /usr/lib/scohelp
on the documentation server you are testing with (by default this is the
local machine).